package org.icop.frame.boost;

import org.icop.model.MultiSet;
import org.icop.model.ValuedCorrespondence;
import org.jbpt.graph.abs.IEdge;
import org.jbpt.graph.abs.IGraph;
import org.jbpt.hypergraph.abs.IVertex;

public interface Booster<G extends IGraph<E,V>, E extends IEdge<V>, V extends IVertex> {

	/**
	 * 'Boosts' (improves) the given mapping. There are no restrictions to how the mapping is improved.
	 * Possibilities for boosting the mapping include, but are not limited to:
	 * - removing matches from the mapping
	 * - merging matches into a single match
	 * - re-calculating the score of a match
	 * 
	 * @param sg1 Mapped graph.
	 * @param sg2 Mapped graph.
	 * @param mapping Mapping such that for each (s1,s2) \in mapping: (s1,s2) \subseteq sg1.getVertices() \times sg2.getVertices().
	 * @return Mapping such that for each (s1,s2) \in mapping: (s1,s2) \subseteq sg1.getVertices() \times sg2.getVertices().
	 */
	public MultiSet<ValuedCorrespondence<V>> boost(G sg1, G sg2, MultiSet<ValuedCorrespondence<V>> mapping);
}
